package com.lh.marketing.canvas.enums;

/**
 * 画布状态
 */
public enum CanvasStatusEnum {

    wait(0,"等待发布"),
    publish(1,"发布中"),
    pause(2,"暂停中"),
    stop(3,"已停止");

    public final Integer type;

    public final String remark;

    CanvasStatusEnum(Integer type, String...remarks) {
        this.type = type;
        this.remark = remarks.length>0?remarks[0]:"";
    }

    public static CanvasStatusEnum getByType(Integer type){
        if(type == null){
            return wait;
        }
        for (CanvasStatusEnum pe : CanvasStatusEnum.values()) {
            if(pe.type.equals(type)){
                return pe;
            }
        }
        return wait;
    }
}
